package com.frame.pageform.job;

import java.util.concurrent.*;


public class TestSchedule {
	public static void main(String[] e){
		ExecutorService pool;
		//pool = Executors.newFixedThreadPool(2);//创建有2个主线程的线程池
		pool=Executors.newSingleThreadExecutor();//创建单线程的线程池（只有一个主线程在运行，有多任务时，任务单行排队）
//		Thread2 a1=new Thread2("aa");
//		Thread1 a2=new Thread1("bb");
//		Thread1 a3=new Thread1("cc");
//		Thread1 a4=new Thread1("ee");
//		Thread1 a5=new Thread1("ff");
//		pool.execute(a1);
//		pool.execute(a2);
//		pool.execute(a3);
//		pool.execute(a4);
//		pool.execute(a5);
//		pool.shutdown();
	}
}
